{
int lat_tmp,lon_tmp;
- while (1) {
+ while (true) {
Waypoint* wpt_tmp;
lat_tmp = gbfgetint32(file_in);
static void
garmin_gpi_read()
{
- while (1) {
+ while (true) {
int tag = gbfgetint32(fin);
if (tag == 0xffff) {
return;
routehead->rte_desc = QString("Step %1").arg(goog_step);
} else {
utf_string utf;
- utf.is_html = 1;
+ utf.is_html = true;
utf.utfstring = instructions;
char *s = strip_html(&utf);
routehead->rte_desc = s;
static Waypoint* wpt_tmp;
static UrlLink* link_;
-static int cache_descr_is_html;
+static bool cache_descr_is_html;
static gpsbabel::File* iqfile;
static gpsbabel::File* oqfile;
static gpsbabel::XmlStreamWriter* writer;
static void
tag_cache_desc(const QXmlStreamAttributes& attr)
{
- cache_descr_is_html = 0;
+ cache_descr_is_html = false;
if (attr.hasAttribute("html")) {
if (attr.value("html").toString() == QStringLiteral("True")) {
- cache_descr_is_html = 1;
+ cache_descr_is_html = true;
}
}
}
strcpy(trk_desc, HDRMAGIC HDRDELIM);
- while (1) {
+ while (true) {
rec_type = get_record(&ibuf);
switch (rec_type) {
case rec_manuf_id:
{
char line[1024];
Waypoint* wpt;
- while (1) {
+ while (true) {
gbser_read_line(fd, line, sizeof(line), 5000, 13, 10);
dbg(1, line);
wpt = gprmc_parse(line);
#include <clocale>
#include <cstdio>
#include <cstdlib>
-#include <signal.h>
+#include <csignal>
#define MYNAME "main"
char* ofname = NULL;
const char* ivec_opts = NULL;
const char* ovec_opts = NULL;
- char* fvec_opts = NULL;
+ const char* fvec_opts = NULL;
int opt_version = 0;
int did_something = 0;
const char* prog_name = argv[0]; /* argv is modified during processing */
utf_string tmp;
tmp.utfstring = cx;
- tmp.is_html = 1;
+ tmp.is_html = true;
cx = kml = strip_html(&tmp);
}
str += cx;
}
gb_sleep(10*1000);
- if (1 || log_enabled) {
+ if (true || log_enabled) {
i = do_cmd(CMD_LOG_DISABLE, "PMTK001,182,5,3", NULL, 2);
dbg(3, " ---- LOG DISABLE ---- %s\n", i==0?"Success":"Fail");
}
osm_strip_html(const char* str)
{
utf_string utf;
- utf.is_html = 1;
+ utf.is_html = true;
utf.utfstring = (char*)str;
return strip_html(&utf); // util.cc
insize = 1;
- while (1) {
+ while (true) {
p = list;
oldhead = list; /* only used for circular linkage */
list = NULL;
wpt->shortname = (gbfgetcstr(fin));
wpt->description = (gbfgetcstr(fin));
- if (1) { // needs bit values of NEWFORMAT2
+ if (true) { // needs bit values of NEWFORMAT2
uint32_t direction = gbfgetuint32(fin);
uint32_t mins = gbfgetuint32(fin);
(void) direction ;
(void) mins ;
}
- if (1) { // need bit value of NEWFORMAT
+ if (true) { // need bit value of NEWFORMAT
int len = gbfgetuint16(fin);
// probably could treat as a pascal string
char* junk = (char*) xmalloc(len);
unsigned int match_index = 0;
int header_size = 0;
- while (1) {
+ while (true) {
if (gbfread(&byte, 1, 1, tpo_file_in) < 1) {
fatal(MYNAME ": malformed input file - attempt to read past end");
}
static
char*
-entitize(const char* str, int is_html)
+entitize(const char* str, bool is_html)
{
int elen, ecount, nsecount;
entity_types* ep;
track->rte_desc = "V900 GPS tracklog data";
track_add_head(track);
- while (1) {
+ while (true) {
Waypoint* wpt;
char c;
int bad = 0;